package com.jybd.live.mapper;

import com.jybd.live.model.CameraLiveRel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

public interface CameraLiveRelMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(CameraLiveRel record);

    int insertSelective(CameraLiveRel record);

    CameraLiveRel selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(CameraLiveRel record);

    int updateByPrimaryKey(CameraLiveRel record);

    @Select("select * from `tb_camera_live_rel` where `cameraId` = #{cameraId} and `stop_time` is null")
    @ResultMap("BaseResultMap")
    CameraLiveRel selectInUse(@Param("cameraId") Integer cameraId);
}